package com.luyue.zagj.activity.base;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.luyue.zagj.BaseActivity;
import com.luyue.zagj.R;
import com.luyue.zagj.utils.CountDownTimerUtils;
import com.umeng.analytics.MobclickAgent;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class FindPswPhoneActivity extends BaseActivity {

    @Bind(R.id.findPswPhone_cancel_btn)
    Button findPswPhoneCancelBtn;
    @Bind(R.id.findPswPhone_top_rl)
    RelativeLayout findPswPhoneTopRl;
    @Bind(R.id.findPswPhone_phone_ed)
    EditText findPswPhonePhoneEd;
    @Bind(R.id.findPswPhone_code_ed)
    EditText findPswPhoneCodeEd;
    @Bind(R.id.findPswPhone_get_code_tv)
    TextView findPswPhoneGetCodeTv;
    @Bind(R.id.findPswPhone_psw_ed)
    EditText findPswPhonePswEd;
    @Bind(R.id.findPswPhone_btn)
    Button findPswPhoneBtn;
    @Bind(R.id.findPswPhone_to_findPswPro_tv)
    LinearLayout findPswPhoneToLoginTv;
    private int i = 60;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_find_psw_phone);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.findPswPhone_cancel_btn, R.id.findPswPhone_get_code_tv, R.id.findPswPhone_btn, R.id.findPswPhone_to_findPswPro_tv})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.findPswPhone_cancel_btn:
                onBackPressed();
                break;
            case R.id.findPswPhone_get_code_tv:
                i=60;
                CountDownTimerUtils mCountDownTimerUtils = new CountDownTimerUtils(findPswPhoneGetCodeTv, 60000, 1000);
                mCountDownTimerUtils.start();
                getCode();
                break;
            case R.id.findPswPhone_btn:
                Intent it = new Intent(this, ResetPswActivity.class);
                startActivity(it);
                break;
            case R.id.findPswPhone_to_findPswPro_tv:
                Intent it2 = new Intent(this, FindPswPro1Activity.class);
                startActivity(it2);
                break;
        }
    }

    private void getCode() {
    }
    @Override
    public void onResume() {
        super.onResume();
        MobclickAgent.onResume(this);
        i = 0;
    }

    public void onPause() {
        super.onPause();
        MobclickAgent.onPause(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

    }
}
